passthrough/io: fall back to remapping interrupt when we can't use VT-d PI
authorChao Gao <chao.gao@intel.com>
Fri, 7 Apr 2017 13:38:40 +0000 (15:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Apr 2017 13:38:40 +0000 (15:38 +0200)
commit220e0b033d957f61b772d59cf1b2124fe760b06d
tree127f97d1498b7e975f1ca9c813d1c9582cd1e404
parent93358e8e83db01d6e5b7fb40ab96082fe31447b1
passthrough/io: fall back to remapping interrupt when we can't use VT-d PI

The current logic of using VT-d pi is when guest configurates the pirq's
destination vcpu to a single vcpu, the according IRTE is updated to
posted format. If the destination of the pirq is multiple vcpus, we will
stay in posted format. Obviously, we should fall back to remapping interrupt
when guest wrongly configurate destination of pirq or makes it have
multi-destination vcpus.

Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
[jb: guard against vcpu being NULL]
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/io.c